package com.dzl.cloud.service;


import com.dzl.cloud.dto.LoginDTO;
import com.dzl.cloud.dto.UpdateUserDTO;
import com.dzl.cloud.entity.User;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 光的代言人
 */
public interface UserService {
    User findByUsername(String username);
    void registerUser(User user, HttpServletRequest request);
    User login(LoginDTO request,HttpServletRequest request2);


    User findById(Long userId,Long currentUserId);
    // 根据权限修改用户信息
    void updateUserWithPermission(Long userId, UpdateUserDTO request, Long currentUserId,HttpServletRequest request2);
    void updateUser(Long userId, User user);
    // 重置密码
    void resetPassword(Long userId, String newPassword,Long currentUserId);
//    String getUserRoleCode(Long userId);
    List<User> getUserListWithPermission(Long currentUserId);
}
